import store from "@/store";
import dayjs from "dayjs";
export const formItemStyle = {
  paddingLeft: "20px",
};

export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};
// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};
export const tableBase = [
  {
    label: "类别名称",
    prop: "cargoName",
    operate: {
      type: "input",
      field: "cargoName",
    },
  },
  {
    label: "类别说明",
    prop: "cargoDescription",
    operate: {
      type: "input",
      field: "cargoDescription",
    },
  },
  {
    label: "出口",
    prop: "carrierName",
    operate: {
      type: "select",
      field: "exportId",
      optionsKey: "carrierName",
      optionsValue: "id",
      options: [],
    },
  },
  {
    label: "简码",
    prop: "simplifiedCode",
    operate: {
      type: "input",
      field: "simplifiedCode",
    },
  },
  {
    label: "优先级别",
    prop: "level",
    rules: [{ reg: /^\d+$/ }],
    operate: {
      type: "input",
      field: "level",
    },
  },
  {
    label: "价格",
    prop: "price",
    rules: [{ reg: /^\d+$/ }],
    operate: {
      type: "inputNumber",
      field: "price",
      otherOptions: {
        precision: 2,
        step: 0.1,
        min: 0,
      },
    },
  },
  {
    label: "店铺",
    prop: "shopName",
    width: 150,
    operate: {
      type: "select",
      field: "shopId",
      optionsKey: "shopName",
      optionsValue: "id",
      options: store.state.custom_dict.shop,
    },
  },
];
